import { FC } from 'react'
import { Outlet } from 'react-router-dom'
import useLoadUserData from '../components/hooks/useLoadUserData'
import useNavPage from './hooks/useNavPage'

const QuestionLayout: FC = () => {
  const { waitingUserData } = useLoadUserData()
  useNavPage(waitingUserData)

  return <div style={{ height: '100vh' }}>{!waitingUserData && <Outlet />}</div>
}

export default QuestionLayout
